const {
    generateAndParseDiagram,
    searchDiagram,
} = require("../utils/divination_util");
const { BaseCommand } = require("./base");

class DivinationCommand extends BaseCommand {
    async execute() {
        if (this.selfData?.name) {
            return searchDiagram(this.selfData?.name);
        }
        return generateAndParseDiagram(this.selfData?.raw);
    }
}

module.exports = {
    DivinationCommand,
};
